(尤指数据库中)唯一键/唯一约束键:一种约束或键值,保证某列或某几列的取值在表中不重复,用于唯一标识记录(通常允许出现一个或多个 NULL,具体取决于数据库实现)。也可泛指“唯一的关键要素/钥匙”。
/juːˈniːk kiː/
Please add a unique key to prevent duplicate email addresses.
请添加一个唯一键,以防止邮箱地址重复。
To improve data integrity, the table enforces a unique key across the combination of country code and phone number.
为提高数据完整性,该表对“国家代码+电话号码”的组合施加唯一键约束。
unique 来自拉丁语 unicus(“唯一的”),与 unus(“一”)同源;key 源自古英语 cēg(“钥匙”)。在数据库语境中,key 引申为“用于识别/定位记录的字段或字段组合”,因此 unique key 表示“保证唯一性的键”。